package com.waylent.todolist.entity;

import com.yalantis.beamazingtoday.interfaces.BatModel;

import io.objectbox.annotation.Entity;
import io.objectbox.annotation.Id;

@Entity
public class Task implements BatModel {

    @Id
    public long id;
    public String name;
    public int type;
    //只对未完成和未删除的任务排序，默认从大到小排列
    public int order;
    //任务是否完成
    public boolean isChecked;
    //任务是否删除
    public boolean isDelete;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setChecked(boolean checked) {
        isChecked = checked;
    }

    @Override
    public boolean isChecked() {
        return isChecked;
    }

    @Override
    public String getText() {
        return getName();
    }

    @Override
    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }
}
